<h2><?php echo $model->true_name; ?>的用户信息</h2>

<div class="actionBar1">
<?php 
	if(isset($_GET['ok'])) {if($_GET['ok']==0) $mess='添加成功！'; else $mess='更新成功！';unset($_GET['ok']);}//判断添加/更新信息
	$act=isset($_GET['ret'])?$_GET['ret']:$ret;//判断show以后返回路径
	unset($_GET['ret']);unset($_GET['id']);
	$url=array($act)+$_GET;
?>
[<?php echo CHtml::link('返回',$url); ?>]
</div>

<table class="dataGrid"  width="770">
<tr>
	<th class="label" style=width:120px><?php echo CHtml::encode($model->getAttributeLabel('username')); ?>
</th>
    <td style=width:650px><?php echo CHtml::encode($model->username); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('true_name')); ?>
</th>
    <td><?php echo CHtml::encode($model->true_name); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('sex')); ?>
</th>
    <td><?php echo CHtml::encode($model->sex==0?'男':'女'); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('company')); ?>
</th>
    <td><?php echo CHtml::encode($model->company); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('department')); ?>
</th>
    <td><?php echo CHtml::encode($model->department); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('position')); ?>
</th>
    <td><?php echo CHtml::encode($model->position); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('office')); ?>
</th>
    <td><?php echo CHtml::encode($model->office); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('duty')); ?>
</th>
    <td><?php echo CHtml::encode($model->duty); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('entry_time')); ?>
</th>
    <td><?php echo CHtml::encode($model->entry_time); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('mobile_no')); ?>
</th>
    <td><?php echo CHtml::encode($model->mobile_no); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('home_addr')); ?>
</th>
    <td><?php echo CHtml::encode($model->home_addr); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('auth')); ?>
</th>
<td>
<div class="yiiForm" style="width:646px;">
<?php 	$auths=Yii::app()->params['auth'];
$default_operation=Yii::app()->params['auth_operation'];
$contr_sum=count($auths);
$nn=0;
if($contr_sum>0){
	foreach($auths as $indx=>$sval){
		echo "<div style='clear: left;line-height:30px;'>$indx</div>";
		$sn=0;$mn=0;
		echo '<div id="leftaa"  style="width:320px;">';
		foreach($sval as $n=>$val){
			$sn++;
			if($sn%2==0) continue;
			echo "<div class='simple".($mn++%2==0?'':1)."'>".CHtml::label($val['name'],false);
			if(isset($val['default_operation'])&&$val['default_operation']==true)
				$operation=$default_operation;
			else
				$operation=$val['operation'];
			foreach($operation as $i=>$v){
				if(isset($v['show'])&&$v['show']==false) continue;//不显示跳过
				echo $v[0];
				if(is_array($model->auth)&&in_array($val['code'].$i,$model->auth)) echo '<img src="images/default/dd/drop-yes.gif">&nbsp;&nbsp;';
				else echo '<img src="img/error.gif">&nbsp;&nbsp;';
			}
			echo '</div>';
		}
		echo '</div>';
	
		echo '<div id="rightaa" style="width:320px;">';$sn=0;$mn=0;
		foreach($sval as $n=>$val){
			$sn++;
			if($sn%2!=0) continue;
			echo "<div class='simple".($mn++%2==0?'':1)."'>".CHtml::label($val['name'],false);
			if(isset($val['default_operation'])&&$val['default_operation']==true)
				$operation=$default_operation;
			else
				$operation=$val['operation'];
			foreach($operation as $i=>$v){
				if(isset($v['show'])&&$v['show']==false) continue;//不显示跳过
				echo $v[0];
				if(is_array($model->auth)&&in_array($val['code'].$i,$model->auth)) echo '<img src="images/default/dd/drop-yes.gif">&nbsp;&nbsp;';
				else echo '<img src="img/error.gif">&nbsp;&nbsp;';
			}
			echo '</div>';
		}
		if($sn%2==1) echo "<div class='simple".($mn%2==0?'':1)."'></div>";
		echo '</div>';
	}
}?>
</div>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('birthday')); ?>
</th>
    <td><?php echo CHtml::encode($model->birthday); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('educational_background')); ?>
</th>
    <td><?php echo CHtml::encode($model->educational_background); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('household_register')); ?>
</th>
    <td><?php echo CHtml::encode($model->household_register); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('card_id')); ?>
</th>
    <td><?php echo CHtml::encode($model->card_id); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('home_tel')); ?>
</th>
    <td><?php echo CHtml::encode($model->home_tel); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('region')); ?>
</th>
    <td><?php echo CHtml::encode($model->region); ?>
</td>
</tr>
<tr>
	<th class="label"><?php echo CHtml::encode($model->getAttributeLabel('create_time')); ?>
</th>
    <td><?php echo CHtml::encode($model->create_time); ?>
</td>
</tr>
</table>
<?php if(isset($mess)) echo "<script>alert('$mess');</script>";?>
<div class="actionBar1">[<?php echo CHtml::link('返回',$url); ?>]
</div>